package com.lidx.back.statistics.commons.task;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import com.lidx.back.statistics.commons.SpringContextHolder;

@Service
@Lazy(value=false)
public class SessionClearTask {
	
	 //@Scheduled(cron="0/10 0 0 * * *")  
	/* @Scheduled(fixedRate = 5000)
    public void firstTask(){  
	    SessionFactory sessionFactory = SpringContextHolder.getBean("sessionFactory");
		sessionFactory.getCurrentSession().flush();
		sessionFactory.getCurrentSession().clear();
        System.out.println("==============it is first task!时间："+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));  
    }*/
}
